import React from 'react'
import './index.scss'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { createRoot } from 'react-dom/client'
// 先导入 antd 样式文件
import 'antd/dist/antd.css'
// 再导入全局样式文件，防止样式覆盖
import './index.scss'
// 集成redux
import { Provider } from 'react-redux'
import store from './store'
// 全局国际化的配置
import { ConfigProvider } from 'antd'
import zhCN from 'antd/lib/locale/zh_CN'
const root = createRoot(document.getElementById('root'))

const tpl = (
  <Provider store={store}>
    <ConfigProvider locale={zhCN}>
      <App />
    </ConfigProvider>
  </Provider>
)

root.render(tpl)
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals()
